package o;

final class ef {

    interface b<T> {
        void ˊ(T[] tArr, int i);

        boolean ˊ(T t);

        T ॱ();
    }

    static class c<T> implements b<T> {
        private final Object[] ˊ;
        private int ˎ;

        c(int i) {
            if (i <= 0) {
                throw new IllegalArgumentException("The max pool size must be > 0");
            }
            this.ˊ = new Object[i];
        }

        public T ॱ() {
            if (this.ˎ <= 0) {
                return null;
            }
            int i = this.ˎ - 1;
            T t = this.ˊ[i];
            this.ˊ[i] = null;
            this.ˎ--;
            return t;
        }

        public boolean ˊ(T t) {
            if (this.ˎ >= this.ˊ.length) {
                return false;
            }
            this.ˊ[this.ˎ] = t;
            this.ˎ++;
            return true;
        }

        public void ˊ(T[] tArr, int i) {
            if (i > tArr.length) {
                i = tArr.length;
            }
            for (int i2 = 0; i2 < i; i2++) {
                T t = tArr[i2];
                if (this.ˎ < this.ˊ.length) {
                    this.ˊ[this.ˎ] = t;
                    this.ˎ++;
                }
            }
        }
    }
}
